<template>
  <div class="priject-list">
    <common-breadcrumb :crumb="crumb"></common-breadcrumb>
    <el-card>
      <el-table :data="tableData" border stripe>
        <el-table-column type="expand">
          <template slot-scope="scope">
            {{scope.row}}
          </template>
        </el-table-column>
        <el-table-column type="index" label="#"></el-table-column>
        <el-table-column label="项目名称" prop="project_name"></el-table-column>
        <el-table-column label="项目描述" prop="project_desc"></el-table-column>
        <el-table-column label="产品经理" prop="project_pm"></el-table-column>
        <el-table-column label="程序员" prop="project_programmer"></el-table-column>
        <el-table-column label="操作">
          <template slot-scope="">
             <el-link type="primary">查看项目接口</el-link>
          </template>
        </el-table-column>
      </el-table>
    </el-card>
  </div>
</template>
<script>
import commonBreadcrumb from '../../components/common/Breadcrumb'
export default {
  data () {
    return {
      tableData: [],
      crumb: ['API', '项目列表']
    }
  },
  components: {
    commonBreadcrumb
  },
  created () {
    this.getAllProjects()
  },
  methods: {
    async getAllProjects () {
      const { data: res } = await this.$axios.get('allprojects')
      this.tableData = res.result
      // this.tableData = res
    }
  }
}
</script>
